
export const column = [
    {
        label: '配置名称',
        name: 'label',
    },
    {
        title: '操作',
        name: 'action',
        width: '260',
        buttons: [],
    },
]

export const config = [
    {
        name: 'label',
        type: 'input',
        placeholder: '配置名称',
        label: '配置名称',
        required: true,
    },
    {
        name: 'value',
        type: 'textarea',
        placeholder: '请输入配置的json字符串',
        label: '配置详情',
        required: false,
    },
]

let server_state = {
    dirc: {
        0: '未启动',
        1: '已启动',
        '-1': '服务异常',
    },
    color: {
        0: '#717272',
        1: '#259645',
        '-1': '#E74032',
    },
}
export const tableColumn = [
    {
        name: 'time',
        label: '检测时间',
        width: 200,
    },
    {
        name: 'label',
        label: '服务名称',
    },
    {
        name: 'port',
        label: '端口',
    },
    {
        name: 'msg',
        label: '说明',
    },

    {
        name: 'server_state',
        label: '服务状态',
        format: (val) => server_state.dirc[val],
        color: (val) => server_state.color[val],
    },
]
